#include <stdio.h>
int num_diff_bit(int m, int n)
{
    //m异或n，相异为1
    int t = m ^ n;
    //统计t中1的个数
    int count = 0;
    while(t)
    {
        t = t & (t-1);
        count++;
    }
    return count;
    
}
int main()
{
    int m = 0;
    int n = 0;
    printf("请输入m,n:>");
    scanf("%d %d",&m, &n);
    int ret = num_diff_bit(m,n);
    printf("%d,%d中不同的bit位数:%d",m,n,ret);
    return 0;
}